﻿using System;
using UnityEditor;
using UnityEngine;

public class Vector3DrawType : BaseDrawType
{
    public override Type type { get { return typeof(Vector3); } }
    public override string Draw(string name, string arg)
    {
        Vector3 value = Vector3.zero;
        if (!string.IsNullOrEmpty(arg))
        {
            value = JsonUtility.FromJson<Vector3>(arg);
        }
        var result = EditorGUILayout.Vector3Field(name, value);
        return JsonUtility.ToJson(result);

    }
}
